
package com.jf.cloud.common.product.vo.app;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.jf.cloud.common.product.vo.ComboVO;
import com.jf.cloud.common.product.vo.GiveawayVO;
import com.jf.cloud.common.product.vo.SpuActivityAppVO;
import com.jf.cloud.common.serializer.ImgJsonSerializer;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Date;
import java.util.List;

/**
 * spu信息VO
 *
 * @author zz
 * @date 2020-10-28 15:27:24
 */
public class SpuAppVO {
    private static final long serialVersionUID = 1L;

    @Schema(description = "spu id" )
    private Long spuId;

    @Schema(description = "店铺id" )
    private Long shopId;

    @Schema(description = "spu名称" )
    private String spuName;

    @Schema(description = "卖点" )
    private String sellingPoint;

    @Schema(description = "分类ID" )
    private Long categoryId;

    @Schema(description = "店铺分类ID" )
    private Long shopCategoryId;

    @JsonSerialize(using = ImgJsonSerializer.class)
    @Schema(description = "商品介绍主图" )
    private String mainImgUrl;

    @JsonSerialize(using = ImgJsonSerializer.class)
    @Schema(description = "商品介绍主图 多个图片逗号分隔" )
    private String imgUrls;

    @JsonSerialize(using = ImgJsonSerializer.class)
    @Schema(description = "商品视频" )
    private String video;

    @Schema(description = "售价，整数方式保存" )
    private Long priceFee;

    @Schema(description = "市场价，整数方式保存" )
    private Long marketPriceFee;

    @Schema(description = "商品详情" )
    private String detail;

    @Schema(description = "总库存" )
    private Integer totalStock;

    @Schema(description = "规格属性" )
    private List<SpuAttrValueAppVO> spuAttrValues;

    @Schema(description = "sku列表" )
    private List<SkuAppVO> skus;

    @Schema(description = "配送方式json见TransportModeVO" )
    private String deliveryMode;

    @Schema(description = "运费模板id" )
    private Long deliveryTemplateId;

    @Schema(description = "商品类型(0普通商品 1拼团 2秒杀 3积分)" )
    private Integer spuType;

    @Schema(description = "商品类别 0.实物商品 1. 虚拟商品" )
    private Integer spuMold;

    @Schema(description = "是否可以退款 1.可以 0.不可以" )
    private Integer isRefund;

    @Schema(description = "虚拟商品的留言备注" )
    private String virtualRemark;

    @Schema(description = "活动id(关联prod_type)" )
    private Long activityId;

    @Schema(description = "是否为组合商品0普通商品，1组合商品" )
    private Integer isCompose;

    @Schema(description = "商品销量" )
    private Integer saleNum;

    @Schema(description = "评论数量" )
    private Integer commentNum;

    @Schema(description = "商品活动信息(JSON)" )
    private SpuActivityAppVO spuActivity;

    @Schema(description = "状态 1:enable, 0:disable, -1:deleted" )
    private Integer status;

    @Schema(description = "发货方式 1.供应商发货 2.仓库发货" )
    private Integer supplierDeliveryType;

    @Schema(description = "关联商品商品id，只有供应商商品为2才有" )
    private Long supplierSpuId;

    @Schema(description = "spu编码" )
    private String spuCode;

    @Schema(description = "计量单位" )
    private String measureUnit;

    @Schema(description = "供应商商品类型 0.否 1.是 2.商家代销" )
    private Integer supplierSpuType;

    @Schema(description = "商品赠品" )
    private GiveawayVO giveaway;


    @Schema(description = "预售类型  -1：未开启 0.全款预售 1.定金预售" )
    private Integer preSaleType;

    @Schema(description = "定金收取类型 0.按比例 1.按金额" )
    private Integer depositType;

    @Schema(description = "定金数额" )
    private Long depositAmount;
    @Schema(description = "定金膨胀数额" )
    private Long depositExpansionAmount;
//
//    @Schema(description = "定金数值" )
//    private BigDecimal depositValue;
//
//    @Schema(description = "定金膨胀数值" )
//    private BigDecimal depositExpansionValue;

    @Schema(description = "定金支付开始时间" )
    private Date depositStartTime;

    @Schema(description = "定金支付结束时间" )
    private Date depositEndTime;

    @Schema(description = "尾款支付开始时间" )
    private Date balanceStartTime;

    @Schema(description = "尾款支付结束时间" )
    private Date balanceEndTime;

    @Schema(description = "预售发货类型 -1.固定时间 x.尾款支付后x天发货" )
    private Integer preSaleDeliveryType;

    @Schema(description = "预售发货时间" )
    private Date preSaleDeliveryTime;

    @Schema(description = "商品套餐列表" )
    private List<ComboVO> comboList;

    @Schema(description = "是否在配送范围内" )
    private Boolean isDelivery;

    @Schema(description = "核销次数 -1.多次核销 0.无需核销 1.单次核销" )
    private Integer writeOffNum;

    @Schema(description = "多次核销次数 -1.无限次" )
    private Integer writeOffMultipleCount;

    @Schema(description = "核销有效期 -1.长期有效 0.自定义  x.x天内有效" )
    private Integer writeOffTime;

    @Schema(description = "核销开始时间" )
    private Date writeOffStart;

    @Schema(description = "核销结束时间" )
    private Date writeOffEnd;

    @Schema(description = "是否开启同城配送" )
    private Boolean cityDelivery;

    public Boolean getCityDelivery() {
        return cityDelivery;
    }

    public void setCityDelivery(Boolean cityDelivery) {
        this.cityDelivery = cityDelivery;
    }

    public Boolean getDelivery() {
        return isDelivery;
    }

    public void setDelivery(Boolean delivery) {
        isDelivery = delivery;
    }

    public Integer getWriteOffNum() {
        return writeOffNum;
    }

    public void setWriteOffNum(Integer writeOffNum) {
        this.writeOffNum = writeOffNum;
    }

    public Integer getWriteOffMultipleCount() {
        return writeOffMultipleCount;
    }

    public void setWriteOffMultipleCount(Integer writeOffMultipleCount) {
        this.writeOffMultipleCount = writeOffMultipleCount;
    }

    public Integer getWriteOffTime() {
        return writeOffTime;
    }

    public void setWriteOffTime(Integer writeOffTime) {
        this.writeOffTime = writeOffTime;
    }

    public Date getWriteOffStart() {
        return writeOffStart;
    }

    public void setWriteOffStart(Date writeOffStart) {
        this.writeOffStart = writeOffStart;
    }

    public Date getWriteOffEnd() {
        return writeOffEnd;
    }

    public void setWriteOffEnd(Date writeOffEnd) {
        this.writeOffEnd = writeOffEnd;
    }

    public Boolean getIsDelivery() {
        return isDelivery;
    }

    public void setIsDelivery(Boolean delivery) {
        isDelivery = delivery;
    }

    public List<ComboVO> getComboList() {
        return comboList;
    }

    public void setComboList(List<ComboVO> comboList) {
        this.comboList = comboList;
    }
    public Long getDepositAmount() {
        return depositAmount;
    }

    public void setDepositAmount(Long depositAmount) {
        this.depositAmount = depositAmount;
    }

    public Long getDepositExpansionAmount() {
        return depositExpansionAmount;
    }

    public void setDepositExpansionAmount(Long depositExpansionAmount) {
        this.depositExpansionAmount = depositExpansionAmount;
    }
    public Integer getSupplierSpuType() {
        return supplierSpuType;
    }

    public void setSupplierSpuType(Integer supplierSpuType) {
        this.supplierSpuType = supplierSpuType;
    }

    public String getMeasureUnit() {
        return measureUnit;
    }

    public void setMeasureUnit(String measureUnit) {
        this.measureUnit = measureUnit;
    }

    public String getSpuCode() {
        return spuCode;
    }

    public void setSpuCode(String spuCode) {
        this.spuCode = spuCode;
    }

    public Long getSupplierSpuId() {
        return supplierSpuId;
    }

    public void setSupplierSpuId(Long supplierSpuId) {
        this.supplierSpuId = supplierSpuId;
    }

    public Integer getSupplierDeliveryType() {
        return supplierDeliveryType;
    }

    public void setSupplierDeliveryType(Integer supplierDeliveryType) {
        this.supplierDeliveryType = supplierDeliveryType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMainImgUrl() {
        return mainImgUrl;
    }

    public void setMainImgUrl(String mainImgUrl) {
        this.mainImgUrl = mainImgUrl;
    }

    public List<SkuAppVO> getSkus() {
        return skus;
    }

    public void setSkus(List<SkuAppVO> skus) {
        this.skus = skus;
    }

    public List<SpuAttrValueAppVO> getSpuAttrValues() {
        return spuAttrValues;
    }

    public void setSpuAttrValues(List<SpuAttrValueAppVO> spuAttrValues) {
        this.spuAttrValues = spuAttrValues;
    }

    public Integer getTotalStock() {
        return totalStock;
    }

    public void setTotalStock(Integer totalStock) {
        this.totalStock = totalStock;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public String getSpuName() {
        return spuName;
    }

    public void setSpuName(String spuName) {
        this.spuName = spuName;
    }

    public String getImgUrls() {
        return imgUrls;
    }

    public void setImgUrls(String imgUrls) {
        this.imgUrls = imgUrls;
    }

    public Long getPriceFee() {
        return priceFee;
    }

    public void setPriceFee(Long priceFee) {
        this.priceFee = priceFee;
    }

    public Long getMarketPriceFee() {
        return marketPriceFee;
    }

    public void setMarketPriceFee(Long marketPriceFee) {
        this.marketPriceFee = marketPriceFee;
    }

    public String getSellingPoint() {
        return sellingPoint;
    }

    public void setSellingPoint(String sellingPoint) {
        this.sellingPoint = sellingPoint;
    }

    public String getDeliveryMode() {
        return deliveryMode;
    }

    public void setDeliveryMode(String deliveryMode) {
        this.deliveryMode = deliveryMode;
    }

    public Long getDeliveryTemplateId() {
        return deliveryTemplateId;
    }

    public void setDeliveryTemplateId(Long deliveryTemplateId) {
        this.deliveryTemplateId = deliveryTemplateId;
    }

    public Integer getSpuType() {
        return spuType;
    }

    public void setSpuType(Integer spuType) {
        this.spuType = spuType;
    }

    public Integer getSpuMold() {
        return spuMold;
    }

    public void setSpuMold(Integer spuMold) {
        this.spuMold = spuMold;
    }

    public Integer getIsRefund() {
        return isRefund;
    }

    public void setIsRefund(Integer isRefund) {
        this.isRefund = isRefund;
    }

    public String getVirtualRemark() {
        return virtualRemark;
    }

    public void setVirtualRemark(String virtualRemark) {
        this.virtualRemark = virtualRemark;
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public Integer getIsCompose() {
        return isCompose;
    }

    public void setIsCompose(Integer isCompose) {
        this.isCompose = isCompose;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Integer getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Integer saleNum) {
        this.saleNum = saleNum;
    }

    public Integer getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(Integer commentNum) {
        this.commentNum = commentNum;
    }

    public SpuActivityAppVO getSpuActivity() {
        return spuActivity;
    }

    public void setSpuActivity(SpuActivityAppVO spuActivity) {
        this.spuActivity = spuActivity;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getShopCategoryId() {
        return shopCategoryId;
    }

    public void setShopCategoryId(Long shopCategoryId) {
        this.shopCategoryId = shopCategoryId;
    }

    public GiveawayVO getGiveaway() {
        return giveaway;
    }

    public void setGiveaway(GiveawayVO giveaway) {
        this.giveaway = giveaway;
    }

    public Integer getPreSaleType() {
        return preSaleType;
    }

    public void setPreSaleType(Integer preSaleType) {
        this.preSaleType = preSaleType;
    }

    public Integer getDepositType() {
        return depositType;
    }

    public void setDepositType(Integer depositType) {
        this.depositType = depositType;
    }
//
//    public BigDecimal getDepositValue() {
//        return depositValue;
//    }
//
//    public void setDepositValue(BigDecimal depositValue) {
//        this.depositValue = depositValue;
//    }
//
//    public BigDecimal getDepositExpansionValue() {
//        return depositExpansionValue;
//    }
//
//    public void setDepositExpansionValue(BigDecimal depositExpansionValue) {
//        this.depositExpansionValue = depositExpansionValue;
//    }

    public Date getDepositStartTime() {
        return depositStartTime;
    }

    public void setDepositStartTime(Date depositStartTime) {
        this.depositStartTime = depositStartTime;
    }

    public Date getDepositEndTime() {
        return depositEndTime;
    }

    public void setDepositEndTime(Date depositEndTime) {
        this.depositEndTime = depositEndTime;
    }

    public Date getBalanceStartTime() {
        return balanceStartTime;
    }

    public void setBalanceStartTime(Date balanceStartTime) {
        this.balanceStartTime = balanceStartTime;
    }

    public Date getBalanceEndTime() {
        return balanceEndTime;
    }

    public void setBalanceEndTime(Date balanceEndTime) {
        this.balanceEndTime = balanceEndTime;
    }

    public Integer getPreSaleDeliveryType() {
        return preSaleDeliveryType;
    }

    public void setPreSaleDeliveryType(Integer preSaleDeliveryType) {
        this.preSaleDeliveryType = preSaleDeliveryType;
    }

    public Date getPreSaleDeliveryTime() {
        return preSaleDeliveryTime;
    }

    public void setPreSaleDeliveryTime(Date preSaleDeliveryTime) {
        this.preSaleDeliveryTime = preSaleDeliveryTime;
    }

    @Override
    public String toString() {
        return "SpuAppVO{" +
                "spuId=" + spuId +
                ", shopId=" + shopId +
                ", spuName='" + spuName + '\'' +
                ", sellingPoint='" + sellingPoint + '\'' +
                ", categoryId=" + categoryId +
                ", shopCategoryId=" + shopCategoryId +
                ", mainImgUrl='" + mainImgUrl + '\'' +
                ", imgUrls='" + imgUrls + '\'' +
                ", video='" + video + '\'' +
                ", priceFee=" + priceFee +
                ", marketPriceFee=" + marketPriceFee +
                ", detail='" + detail + '\'' +
                ", totalStock=" + totalStock +
                ", spuAttrValues=" + spuAttrValues +
                ", skus=" + skus +
                ", deliveryMode='" + deliveryMode + '\'' +
                ", deliveryTemplateId=" + deliveryTemplateId +
                ", spuType=" + spuType +
                ", spuMold=" + spuMold +
                ", isRefund=" + isRefund +
                ", virtualRemark='" + virtualRemark + '\'' +
                ", activityId=" + activityId +
                ", isCompose=" + isCompose +
                ", saleNum=" + saleNum +
                ", commentNum=" + commentNum +
                ", spuActivity=" + spuActivity +
                ", status=" + status +
                ", supplierDeliveryType=" + supplierDeliveryType +
                ", supplierSpuId=" + supplierSpuId +
                ", spuCode='" + spuCode + '\'' +
                ", measureUnit='" + measureUnit + '\'' +
                ", supplierSpuType=" + supplierSpuType +
                ", giveaway=" + giveaway +
                ", preSaleType=" + preSaleType +
                ", depositType=" + depositType +
                ", depositAmount=" + depositAmount +
                ", depositExpansionAmount=" + depositExpansionAmount +
                ", depositStartTime=" + depositStartTime +
                ", depositEndTime=" + depositEndTime +
                ", balanceStartTime=" + balanceStartTime +
                ", balanceEndTime=" + balanceEndTime +
                ", preSaleDeliveryType=" + preSaleDeliveryType +
                ", preSaleDeliveryTime=" + preSaleDeliveryTime +
                ", comboList=" + comboList +
                ", isDelivery=" + isDelivery +
                ", writeOffNum=" + writeOffNum +
                ", writeOffMultipleCount=" + writeOffMultipleCount +
                ", writeOffTime=" + writeOffTime +
                ", writeOffStart=" + writeOffStart +
                ", writeOffEnd=" + writeOffEnd +
                ", cityDelivery=" + cityDelivery +
                '}';
    }
}
